import yaml


class Config:
    def __init__(self, config_file):
        self.config = self._load_config(config_file)

    def _load_config(self, config_file):
        with open(config_file, 'r', encoding='utf-8') as file:
            config = yaml.safe_load(file)
        return config

    def get(self, section, key, default=None):
        return self.config.get(section, {}).get(key, default)

    def get_section_as_dict(self, section):
        return self.config.get(section, {})
